/**
 * 全局配置信息， 包含网站标题，  动态组件定义
 *
 * @author terrfly
 * @site https://www.jeepay.vip
 * @date 2021/5/8 07:18
 */

/** 应用配置项 **/
export default {
  APP_TITLE: 'Jeepay运营平台', // 设置浏览器title
  ACCESS_TOKEN_NAME: 'iToken' // 设置请求token的名字， 用于请求header 和 localstorage中存在名称
}


let App


/**
 * 与后端开发人员的路由名称及配置项
 * 组件名称 ：{ 默认跳转路径（如果后端配置则已动态配置为准）， 组件渲染 }
 * */
export const asyncRouteDefine = {

  'CurrentUserInfo': { defaultPath: '/current/userinfo', component: () => import('@/views/current/UserinfoPage.vue')  }, // 用户设置

  'MainPage': { defaultPath: '/main', component: () => import('@/views/dashboard/Analysis.vue')  },
  'SysUserPage': { defaultPath: '/users', component: () => import('@/views/sysuser/SysUserPage.vue')  },
  'SysUserTeamPage': { defaultPath: '/teams', component: () => import('@/views/sysuserteam/List.vue')  }, // 团队管理
  'RolePage': { defaultPath: '/roles', component: () => import('@/views/role/RolePage.vue')  },
  'EntPage': { defaultPath: '/ents', component: () => import('@/views/ent/EntPage.vue')  },
  'PayWayPage': { defaultPath: '/payways', component: () => import('@/views/payconfig/payWay/List.vue')  },
  'IfDefinePage': { defaultPath: '/ifdefines', component: () => import('@/views/payconfig/payIfDefine/List.vue')  },
  'IsvListPage': { defaultPath: '/isv', component: () => import('@/views/isv/IsvList.vue')  }, // 服务商列表
  'MchListPage': { defaultPath: '/mch', component: () => import('@/views/mch/MchList.vue')  }, // 商户列表
  'AgentListPage': { defaultPath: '/agent', component: () => import('@/views/agent/AgentList.vue')  }, // 代理商列表
  'MchAppPage': { defaultPath: '/apps', component: () => import ('@/views/mchApp/List.vue')  }, // 商户应用列表
  'ChannelAccountPage': { defaultPath: '/channel/account', component: () => import('@/views/mch/channelaccount/List.vue') }, // 商户三方账户管理

  'MemberPage': { defaultPath: '/member/memberInfo', component: () => import('@/views/member/memberInfo/MemberPage.vue') }, // 会员管理
  'RechargeRulePage': { defaultPath: '/member/rechargeRule', component: () => import('@/views/member/rechargeRule/RechargeRulePage.vue') }, // 会员充值规则
  'MemberAccountPage': { defaultPath: '/member/account', component: () => import('@/views/member/account/MemberAccountPage.vue') }, // 会员账户流水
  'MemberRechargePage': { defaultPath: '/member/recharge', component: () => import('@/views/member/recharge/MemberRechargePage.vue') }, // 会员充值记录
  
  'PayOrderListPage': { defaultPath: '/payOrder', component: () => import('@/views/order/pay/PayOrderList.vue')  }, // 支付订单列表
  'RefundOrderListPage': { defaultPath: '/refundOrder', component: () => import('@/views/order/refund/RefundOrderList.vue')  }, // 退款订单列表
  'TransferOrderListPage': { defaultPath: '/transferOrder', component: () => import('@/views/order/transfer/TransferOrderList.vue')  }, // 转账订单
  'MchNotifyListPage': { defaultPath: '/notify', component: () => import('@/views/order/notify/MchNotifyList.vue')  }, // 商户通知列表
  'HistoryPage': { defaultPath: '/history', component: () => import('@/views/order/history/History.vue') },
  'ChannelCashoutPage': { defaultPath: '/channel/cashout', component: () => import('@/views/order/cashout/List.vue')  }, // 三方账户提现记录列表
  'ZftSettRecordPage': { defaultPath: '/settle/zft', component: () => import('@/views/order/settle/List.vue')  }, // 直付通结算订单记录列表

  'SpeakerPage': { defaultPath: '/speaker', component: () => import('@/views/device/providerconfig/SpeakerList.vue')  }, // 云喇叭厂商配置
  'SpeakerDevicePage': { defaultPath: '/speaker/device', component: () => import('@/views/device/mchstoredevice/speaker/SpeakerList.vue')  }, // 云喇叭设备管理
  'PrinterPage': { defaultPath: '/printer', component: () => import('@/views/device/providerconfig/PrinterList.vue')  }, // 云打印厂商配置
  'PrinterDevicePage': { defaultPath: '/printer/device', component: () => import('@/views/device/mchstoredevice/PrinterList.vue')  }, // 云打印设备管理
  'PosPage': { defaultPath: '/pos', component: () => import('@/views/device/providerconfig/PosList.vue')  }, // 扫码POS厂商配置
  'PosDevicePage': { defaultPath: '/pos/device', component: () => import('@/views/device/mchstoredevice/PosList.vue')  }, // 扫码POS设备管理
  'PluginPage': { defaultPath: '/plugin', component: () => import('@/views/device/providerconfig/PluginList.vue')  }, // 收银插件厂商配置
  'PluginCdKeyPage': { defaultPath: '/plugin/cdkey', component: () => import('@/views/device/mchstoredevice/plugin/CdKeyList.vue')  }, // 收银插件激活码管理
  'AutoPosPage': { defaultPath: '/auto/pos', component: () => import('@/views/device/mchstoredevice/autopos/AutoPosList.vue')  }, // 智能POS设备管理
  'FaceAppPage': { defaultPath: '/face', component: () => import('@/views/device/mchstoredevice/faceapp/FaceAppList.vue')  }, // 刷脸APP管理
  'RuyiPage': { defaultPath: '/ruyi', component: () => import('@/views/device/mchstoredevice/ruyi/RuyiList.vue')  }, // 如意Lite管理

  'SysConfigPage': { defaultPath: '/config', component: () => import('@/views/sys/config/SysConfig.vue')  }, // 系统配置
  'PushConfigPage': { defaultPath: '/push', component: () => import('@/views/sys/config/PushConfig.vue') }, // 订单推送配置
  'AdvertInfoPage': { defaultPath: '/advert', component: () => import('@/views/sys/advert/Advert.vue')  }, // 广告配置
  'SysLogPage': { defaultPath: '/log', component: () => import('@/views/sys/log/SysLog.vue')  }, // 系统日志
  'NoticeInfoPage': { defaultPath: '/notices', component: () => import('@/views/sys/notices/Notices.vue')  }, // 公告管理
  'MchApplymentListPage': { defaultPath: '/applyments', component: () => import('@/views/mch/applyment/MchApplymentList.vue')  }, // 进件
  'ClientVersionPage': { defaultPath: '/version', component: () => import('@/views/version/ClientVersionPage.vue')  }, // 版本管理
  'LegalDayPage': { defaultPath: '/legalday', component: () => import('@/views/sys/legalday/List.vue')  }, // 节假日管理

  'StorePage': { defaultPath: '/store', component: () => import('@/views/store/StorePage.vue') }, // 商户门店管理
  'DivisionReceiverGroupPage': { defaultPath: '/divisionReceiverGroup', component: () => import('@/views/division/group/DivisionReceiverGroupPage.vue') }, // 分账账号组管理
  'DivisionReceiverPage': { defaultPath: '/divisionReceiver', component: () => import('@/views/division/receiver/DivisionReceiverPage.vue') }, // 分账账号管理
  'DivisionRecordPage': { defaultPath: '/divisionRecord', component: () => import('@/views/division/record/DivisionRecordPage.vue') }, // 分账记录
  'DivisionRefundRecordPage': { defaultPath: '/divisionRecord', component: () => import('@/views/division/refund/DivisionRefundRecordPage.vue') }, // 分账回退记录
  'QrcodeCardPage': { defaultPath: '/mchQrCodes', component: () => import('@/views/qrcode/List.vue') }, // 静态码列表
  'QrcodeShellPage': { defaultPath: '/shell', component: () => import('@/views/qrcode/shell/List.vue') }, // 静态码模板管理
  'PlatformProfitPage': { defaultPath: '/platformProfits', component: () => import('@/views/cashout/PlatformProfitPage.vue') }, // 运营佣金
  'CashoutRecordListPage': { defaultPath: '/cashouts', component: () => import('@/views/cashout/CashoutRecordList.vue') }, // 提现记录

  'RepairPage': { defaultPath: '/statistic/repair', component: () => import('@/views/statistic/repair/Repair.vue') }, // 数据修复
  'MchCountPage': { defaultPath: '/statistic/mch', component: () => import('@/views/statistic/mch/List.vue') }, // 商户统计
  'AgentCountPage': { defaultPath: '/statistic/agent', component: () => import('@/views/statistic/agent/List.vue') }, // 代理商统计
  'IsvCountPage': { defaultPath: '/statistic/isv', component: () => import('@/views/statistic/isv/List.vue') }, // 服务商统计
  'TransactionPage': { defaultPath: '/statistic/transaction', component: () => import('@/views/statistic/transaction/List.vue') }, // 交易报表
  'ChannelCountPage': { defaultPath: '/statistic/channel', component: () => import('@/views/statistic/channel/List.vue') }, // 通道统计
  'DeviceCountPage': { defaultPath: '/statistic/device', component: () => import('@/views/statistic/device/List.vue') }, // 设备统计

  'TerminalPage': { defaultPath: '/cashouts', component: () => import('@/views/terminal/TerminalPage.vue') }, // 终端管理

  'CheckBatchPage': { defaultPath: '/checkBatch', component: () => import('@/views/bill/checkBatch/CheckBatchPage.vue') }, // 对账批次
  'CheckChannelBillPage': { defaultPath: '/channelBill', component: () => import('@/views/bill/channelBill/CheckChannelBillPage.vue') }, // 渠道账单
  'CheckDiffPage': { defaultPath: '/diff', component: () => import('@/views/bill/checkDiff/CheckDiffPage.vue') } // 差异账单


}

export function getGlobalApp(){
  return App
}

export function setGlobalApp(app){
  App = app
}
